<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>add-土地录入</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
    <script type="text/javascript" src="../frame/assets/js/lib/jquery.min.js"></script>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script src="../frame/layui/lay/modules/layer.js"></script>
    <link rel="stylesheet" href="../frame/layui/lay/modules/layer/default/layer.css">
    <link rel="stylesheet" href="../frame/layui/css/layui.css"  media="all">
    <link rel="stylesheet" href="../frame/assets/css/lib/bootstrap.min.css">
    <link rel="stylesheet" href="../frame/assets/css/lib/font-awesome.min.css">
    <link rel="stylesheet" href="../frame/assets/css/lib/themify-icons.css">
    <link rel="stylesheet" href="../frame/assets/css/lib/unix.css">
    <link rel="stylesheet" href="../frame/assets/css/style.css">
    <link rel="stylesheet" href="../frame/assets/css/lib/menubar/sidebar.css">
    <link rel="stylesheet" href="../frame/assets/css/lib/sweetalert/sweetalert.css">
    <style>
        .dd{
            color:#ff0000;
            padding-left:30px;
            front-size:15px;
        }
    </style>
</head>

<body style="margin-left:25%;height: 1200px;">
<!--内容-->
<div class="content-wrap" >
    <div class="main">
        <div class="container-fluid">
            <!--欢迎栏-->
            <div class="row">
                <div class="col-lg-8 p-r-0 title-margin-right">
                    <div class="page-header">
                        <div class="page-title">
                            <h1>土地录入</h1>

                        </div>
                    </div>
                </div>
            </div>

            <h4><i class="layui-icon layui-icon-face-smile" style="font-size: 30px; color: #1E9FFF;"></i>  添加资产</h4><br><br>
            <div class="layui-text" style="font-size:18px">
                <label>行政区ID：</label>
                <input type="text" name="name" id="name" >
                <div class="dd" id="p1">
                </div>
                <br><br>
                <label>行政区：</label>
                <input type="text" name="arable" id="arable" >
                <div class="dd" id="p2">
                </div>
                <br><br>
                <label>耕地面积：</label>
                <input type="text" name="urban" id="urban" >
                <div class="dd" id="p3"></div>
                <br><br>
                <label>交通水利用面积：</label>
                <input type="text" name="transportation" id="transportation" >
                <div class="dd" id="p4">
                </div>
                <br><br>
                <label>公共服务用地面积：</label>
                <input type="text" name="tps" id="tps" >
                <div class="dd" id="p5">
                </div>
                <br><br>
                <label>林地面积：</label>
                <input type="text" name="woodland" id="woodland" >
                <div class="dd" id="p6"></div>
                <br><br>
                <label>水域以及水域设施用地面积：</label>
                <input type="text" name="waters" id="waters" >
                <div class="dd" id="p7">
                </div>
                <br><br>
                <label>自然保留地：</label>
                <input type="text" name="naturalland" id="naturalland" >
                <div class="dd" id="p8">
                </div>
                <br><br>
                <label>矿存储用地面积：</label>
                <input type="text" name="industrialland" id="industrialland" >
                <div class="dd" id="p9"></div>
                <br><br>
                <label>更新时间：</label>
                <input type="text" name="time" id="time" >
                <div class="dd" id="p10"></div>
                <br><br>

                <input type="submit" id="submit" onclick="submitp()">
            </div>
        </div>
    </div>
</div>
<!--搜索-->
<div id="search">
    <button type="button" class="close">×</button>
    <form>
        <input type="search" value="" placeholder="type keyword(s) here" />
        <button type="submit" class="btn btn-primary">Search</button>
    </form>
</div>
</body>
<script src="../frame/assets/js/lib/jquery.nanoscroller.min.js"></script>
<script src="../frame/assets/js/lib/menubar/sidebar.js"></script>
<script src="../frame/assets/js/lib/bootstrap.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/datatables.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/dataTables.buttons.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/buttons.flash.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/jszip.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/pdfmake.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/vfs_fonts.js"></script>
<script src="../frame/assets/js/lib/data-table2/buttons.html5.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/buttons.print.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/datatables-init2.js"></script>
<script src="../frame/assets/js/lib/sweetalert/sweetalert.min.js"></script>
<script src="../frame/assets/js/lib/sweetalert/zhuxiao.js"></script>

<script type="text/javascript">
    function submitp(){
        var name=$("#name").val();
        var arable=$("#arable").val();
        var urban=$("#urban").val();
        var transportation=$("#transportation").val();
        var tps=$("#tps").val();
        var woodland=$("#woodland").val();
        var waters=$("#waters").val();
        var naturalland=$("#naturalland").val();
        var industrialland=$("#industrialland").val();
        var time=$("#time").val();
        $.ajax({
            type:'get',
            url:"/addland" ,
            contentType:'application/json;charset=utf-8',
            dataType:'html',
            data:{
                'name':name,
                'arable':arable,
                'urban':urban,
                'transportation':transportation,
                'tps':tps,
                'woodland':woodland,
                'waters':waters,
                'naturalland':naturalland,
                'industrialland':industrialland,
                'time':time
            },
            success:function(res){
                layer.msg("添加成功!");
                alert("成功");
            },
            error:function(res){
                layer.msg("添加失败！");
                alert("失败");
            }
        })
    }

</script>
</html>
